package com.hex.ds.em.hcdp.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum AntlrEnum {

    CREATE("create", "建表"),

    ALTER("alter", "修改表"),

    DROP("drop", "删除表"),

    FILE_NAME_REGULAR("^[a-z|A-Z|0-9|_]+", "文件名称正则规则"),

    STRING("STRING", "STRING字段类型"),

    DECIMAL("DECIMAL", "DECIMAL字段类型"),

    SPECIFY_PARTITION_FIELD("dk_system_of_sdata string comment '源分区'", "指定分区字段需要为dk_system_of_sdata string comment '源分区'"),

    DISTINCT("DISTINCT", "查询时去重关键字"),

    STAR("*", "查询时的所有字段指代关键字"),

    /** 检查项 **/
    TABLE_EXISTS("tableExists", "表是否已经存在元数据表中"),

    DB_NAME_CHECK("dbNameCheck", "库名是否参数化检查"),

    TEM_TABLE_PARTITION_CHECK("temTablePartitionCheck","检查临时表是否有分区字段"),

    END_STATISTICAL_TABLE_CHECK("endStatisticalTableCheck","检查程序尾部是否统计表信息"),

    CORRELATION_CONDITION_CHECK("correlationConditionCheck","关联条件检查"),

    LEFT_JOIN_CHECK("leftJoinCheck","LEFT JOIN检查"),

    EXISTS_AND_IN_CHECK("existsAndInCheck","Exists和In检查"),

    CREATE_CHECK("createCheck", "新建语句检查"),

    CREATE_TABLE_NAME("createTableName", "建表名称检查"),

    COLUMN_COMMENT("columnComment", "字段注释检查"),

    COLUMN_TYPE("columnType", "字段类型检查"),

    COLUMN_NEED("columnNeed", "必需字段检查"),

    PARTITION_CHECK("partitionCheck", "分区字段检查"),

    ALTER_CHECK("alterCheck", "修改语句检查"),

    SUM_CHECK("sumCheck", "SUM函数检查"),

    DISTINCT_CHECK("distinctCheck", "禁止使用DISTINCT检查"),

    SELECT_ALL_CHECK("selectAllCheck", "禁止使用SELECT * 检查"),

    WITH_AS_CHECK("withAsCheck", "禁止使用WITH AS 检查"),

    COMPUTE_CHECK("computeCheck", "统计表操作"),

    REFRESH_CHECK("refreshCheck", "刷新表操作"),

    VALUE_DB_NAME("valueDbNameCheck", "value中库名参数化检查"),

    COMMIT_CHECK("commitCheck", "提交操作检查"),

    DELETE_CHECK("deleteCheck", "删除操作检查"),

    UPDATE_DB_NAME("updateDbNameCheck", "update中库名参数化检查"),

    FILED_CONSANGUINITY("selectFiledConsanguinity", "select语句字段血缘检查"),

    SUB_QUERY_CHECK("selectSubQuery", "select语句子查询检查"),

    SCAN_PART_BY_METADATA("checkPartByMetadata", "根据数据源信息检查分区字段"),

    ERROR_SQL("errorSql", "SQL语法异常"),

    END_METADATA_REFRESH_CHECK("endMetadataRefreshCheck","检查程序尾部是否刷新元数据"),

    OR_CONDITION_CHECK("orConditionCheck","检查or条件是否可以用in替换"),

    TEM_DROP_CHECK("temDropCheck","检查程序尾部是否显式删除临时表"),

    ON_CONDITION_CHECK("onConditionCheck","检查on条件左右两边是否同一张表"),

    LEFT_JOIN_ON_CONDITION_CHECK("leftJoinOnConditionCheck","检查on条件是否跟join表相关联"),

    DENOMINATOR_ZERO_CHECK("denominatorZeroCheck","分母零值检查"),

    LEFT_JOIN_ON_EQUAL_CHECK("leftJoinOnEqualCheck","LEFT JOIN的On条件是否必要检查"),

    INSERT_OVER_WRITE_CHECK("insertOverWriteCheck","INSERT OVERWRITE检查"),

    SQL_PARTITION_NUM_CHECK("sqlPartitionNumCheck","检查作业是否只操作单个分区"),

    PARTITION_TABLE_CHECK("partitionTableCheck","检查分区表是否使用分区字段"),

    UNION_ALL_CHECK("unionAllCheck","Union ALL检查");



    private final String value;

    private final String desc;

}
